<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/8
 * Time: 10:37
 */

$username = $_POST['username'];
$password = $_POST['paw'];

if (empty($username) && empty($password)) {
    echo '用户名或密码为空！' . '<br>';
    echo '请重新登录'; ?>
    <a href="log_in.php">点击重新登录</a>
    <?php
} else {
    if ($username == 'admin' && $password == '888888') {
        echo '登入成功' . '<br>';
        $token = md5($username . $password . time());
        setcookie('Token', $token,time() + 24 + 3600);
        ?>
        <a href="user.php">进入用户中心页面</a>
<?php
    } else {
        echo '用户名或密码错误';
    }
}
